package com.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.entity.Essay;
import com.entity.Message;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

public interface MessageService extends IService<Message> {

    /**
     * 连表查询自己的消息
     * @param userId
     * @return
     */
    IPage<Map<String, Object>> superbMessageById(Page<?> page, Long userId, Integer messageType);


    /**
     * 发动态后通知所有粉丝
     * @param essay
     */
    void sendMessage (Essay essay);

}
